package com.dferreira.repository.data_models;


import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = Repository.TABLE_NAME)
public class Repository {
    public static final String TABLE_NAME = "repository";
    public static final String COLUMN_NAME_VERSION = "version";
    public static final String COLUMN_NAME_URL = "url";

    @DatabaseField(generatedId = true)
    private int id;

    @DatabaseField(columnName = COLUMN_NAME_VERSION, canBeNull = false)
    private Integer version;

    @DatabaseField(columnName = COLUMN_NAME_URL, canBeNull = false)
    private String url;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public String toString() {
        return "Repository [version=" + version + ", url=" + url + "]";
    }


}
